﻿using System;
using System.Collections.Generic;
using System.Runtime.InteropServices;
using HalconDotNet;

namespace ALC.Core.ImageProcessing
{
    public static class Calculation
    {
        [DllImport("rotateDll", EntryPoint = "getAngleRes")]
        private static extern IntPtr getAngleRes(double x1, double y1,
            double z1, double x2, double y2, double z2, double x3, double y3, double z3);


        public static double[] GetAngleRes(double x1, double y1, double z1, double x2, double y2, double z2, double x3,
            double y3, double z3)
        {
            var ptr = getAngleRes(x1, y1, z1,
                x2, y2, z2, 
                x3, y3, z3);
            var buffer = new double[2];
            Marshal.Copy(ptr, buffer, 0, buffer.Length);
            return buffer;
        }

        /// <summary>
        /// 
        /// </summary>
        /// <param name="images"></param>
        /// <returns>x1, y1, x2, y2</returns>
        public static double[] Locate(IList<HImage> images)
        {
            throw new NotImplementedException();
        }
    }
}